package com.example.multiactivitydemo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView

class FirstActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_first)

        val tvMessage: TextView = findViewById(R.id.tvMessage)

        val message = intent.getStringExtra("message")
        val number = intent.getIntExtra("number", 0)

        val displayText = "接收到的消息: $message\n接收到的数字: $number"
        tvMessage.text = displayText
    }
}